<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .fu{background-color: #33e8e2; width: 800px;}
        .fu>div{width: 100px;height: 100px;}
        .z1{background-color: #11fba1; float: right/*浮动 横着排*/}
        .z2{background-color: #ff7300;}
        .z3{background-color: #ca07f6;}
        .z4{background-color: #ea6d93;}
    /*    若所有元素浮动，父元素无失高，高度为0，表象为背景色消失 ，可用overflow解决*/
    </style>
</head>
<body>
<div class="fu">
    <div class="z1">111</div>
    <div class="z2">222</div>
    <div class="z3">333</div>
    <div class="z4">444</div>
</div>
</body>
</html>